package cn.sxt.questions.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.sxt.users.pojo.POJOEnum;

public class Columns implements Serializable{
	private Integer id;
	private String name;
	private String content;
	private String url;
	private byte flag;
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	private List<Items> itemsList=new ArrayList<Items>();
	
	
	public List<Items> getItemsList() {
		return itemsList;
	}
	public void setItemsList(List<Items> itemsList) {
		this.itemsList = itemsList;
	}
	private String statusStr;
	private String flagStr;
	public String getStatusStr() {
		POJOEnum[] pojoEnums=POJOEnum.values();
		for (int i = 0; i < pojoEnums.length; i++) {
			POJOEnum pojoEnum=pojoEnums[i];
			if(pojoEnum.toString().startsWith("STATUS_")
					&& pojoEnum.getStatus()==this.getStatus()){
				this.statusStr=pojoEnum.getName();
			}
		}
		return statusStr;
	}
	public String getFlagStr() {
		POJOEnum[] pojoEnums=POJOEnum.values();
		for (int i = 0; i < pojoEnums.length; i++) {
			POJOEnum pojoEnum=pojoEnums[i];
			if(pojoEnum.toString().startsWith("FLAG_")
					&& pojoEnum.getStatus()==this.getStatus()){
				this.statusStr=pojoEnum.getName();
			}
		}
		return flagStr;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public byte getFlag() {
		return flag;
	}
	public void setFlag(byte flag) {
		this.flag = flag;
	}
	public byte getStatus() {
		return status;
	}
	public void setStatus(byte status) {
		this.status = status;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Date getPubTime() {
		return pubTime;
	}
	public void setPubTime(Date pubTime) {
		this.pubTime = pubTime;
	}
	
}
